image=imread('Fig0424.tif');
subplot(2,3,1);
imshow(image);
title('原图');

image_fft=fft2(image);
subplot(2,3,2);
image_AM_1=log(abs(image_fft)+1);
imshow(image_AM_1, []);
title('傅里叶变换幅度谱');

center = [size(image, 2)/2, size(image, 1)/2];
rotated_img = imrotate(image, -45, 'bilinear', 'crop');

subplot(2,3,3);
imshow(rotated_img);
title('旋转45度');

% imwrite(rotated_img, "rotate.tif");

image_fft=fft2(image);
image_fft_shift=fftshift(image_fft);
image_AM_2=log(abs(image_fft_shift)+1);
subplot(2,3,4);
imshow(image_AM_2,[]);
title('移频后的幅度谱');


image_fft=fft2(rotated_img);
image_fft_shift=fftshift(image_fft);
image_AM_2=log(abs(image_fft_shift)+1);
subplot(2,3,6);
imshow(image_AM_2,[]);
title('旋转后的幅度谱');


